package cn.heyige.backend.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Builder;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 占卜记录实体
 * 对应数据库中的 divination_records 表
 */
@Data
@Builder
@TableName("divination_record")
public class DivinationRecordDO {

    @TableId(type = IdType.AUTO)
    private Integer id;

    @TableField("user_id")
    private Integer userId;

    @TableField("hexagram_name")
    private String hexagramName;

    @TableField("hexagram_code")
    private String hexagramCode;

    @TableField("question")
    private String question;

    @TableField("input_data")
    private String inputData;

    @TableField("hexagram_data")
    private String hexagramData;

    /**
     * AI解释
     */
    @TableField("ai_interpretation")
    private String aiInterpretation;

    @TableField("feedback_rating")
    private Integer feedbackRating;

    @TableField("feedback_comment")
    private String feedbackComment;

    @TableField("is_favorite")
    private Boolean isFavorite;

    @TableField("share_count")
    private Integer shareCount;

    @TableField("view_count")
    private Integer viewCount;

    @TableField("favoriteTime")
    private LocalDateTime favoriteTime;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

}